package com.yanmaohu.nikita.data.function;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class ParameterList {

    private final int beginIndex;
    private final int endIndex;
    private final List<Parameter> parameterList;

    public ParameterList(int beginIndex, int endIndex, List<Parameter> parameterList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.parameterList = parameterList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isEmpty() {
        if (parameterList == null) {
            return true;
        }
        return parameterList.isEmpty();
    }

    public int size() {
        if (parameterList == null) {
            return 0;
        }
        return parameterList.size();
    }

    public Parameter get(int index) {
        return parameterList.get(index);
    }

}
